﻿@model WebApp.Models.ChangePasswordViewModel

@{
    ViewBag.Title = "Change Password";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div>

    @using (Html.BeginForm("ChangePassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
    {
        @Html.AntiForgeryToken()

        <div class="box-body">
            @if (!Html.ViewData.ModelState.IsValid)
            {
                <div class="callout callout-danger">
                    <h4>Error</h4>
                    <p>@Html.ValidationSummary(true, "")</p>
                </div>
            }

            <div class="form-group">
                @Html.LabelFor(model => model.OldPassword, htmlAttributes: new { @class = "col-sm-2 control-label" })
                <div class="col-sm-10">
                    @Html.PasswordFor(model => model.OldPassword, new { htmlAttributes = new { @class = "form-control" } })
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.NewPassword, htmlAttributes: new { @class = "col-sm-2 control-label" })
                <div class="col-sm-10">
                    @Html.PasswordFor(model => model.NewPassword, new { htmlAttributes = new { @class = "form-control" } })
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.ConfirmPassword, htmlAttributes: new { @class = "col-sm-2 control-label" })
                <div class="col-sm-10">
                    @Html.PasswordFor(model => model.ConfirmPassword, new { htmlAttributes = new { @class = "form-control" } })
                </div>
            </div>

        </div><!-- /.box-body -->
        <div class="box-footer">
            <a href="@Url.Action("Index","ClientProfile")" class="btn btn-default">Back</a>

            <input type="submit" value="Change Password" class="btn btn-info pull-right" />
        </div><!-- /.box-footer -->
    }
</div>
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}